package com.jt.demo02;
import com.jt.demo02.config.SpringConfig;
import com.jt.demo02.pojo.Dog;
import com.jt.demo02.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**用于测试工厂模式创建代理对象*/
public class TestDogFactory {
    public static void main(String[] args) {
        ApplicationContext context =
                new AnnotationConfigApplicationContext(SpringConfig.class);
        Dog dog = context.getBean(Dog.class);
        dog.say();
    }

}
